﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DTO;
namespace DA1
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }
     
        private void btn_OK_Click(object sender, EventArgs e)
        {
            Login_BUS login_BUS = new Login_BUS();
            IDataReader reader = login_BUS.Get_User(txt_Username.Text.ToString());
            while (reader.Read())
            {
                if (reader[0].ToString() == txt_Pass.Text.ToString())
                {
                   
                }
                else
                {
                    Lbl_ThongBao.Text = "Login thất bại";
                    Lbl_ThongBao.Visible = true;
                }
            }
        }

        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
